{capture name=path}
	<a href="webboard.php?board=0.1">
		{l s='Webboard'}
	</a>
	<span class="navigation-pipe">{$navigationPipe}</span>
	{$topic[0].topic_title|escape:htmlall:'UTF-8'|truncate:30}
{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}

<div id="my-webboard">
	<h4>
		<div class="webboard_icon">
			<a id="webboard_icon" href="webboard.php" title="webboard home"></a>
		</div>
	</h4>
	<div class="block_content_wrapper">
		<table class="block_content" cellpadding="5" cellspacing="0" border="0">
			<tr class="topic_title">
				<td colspan="2">{$topic[0].topic_title|wordwrap:50:"<br />"}</td>
			</tr>	
			{if $selected_page == 1}{*display content of the topic*}
			<tr class="posted_content">
				<td class="post_info">
					<p class="author"><b>Author: </b>{$topic[0].author|escape:htmlall:'UTF-8'}({$topic[0].author_username|escape:htmlall:'UTF-8'}){if $topic[0].show_admin_icon == true}<img class="admin_icon" src='{$img_dir}admin_icon.png' />{/if}</p>
					<p class="posted"><b>Posted: </b>{$topic[0].post_time|escape:htmlall:'UTF-8'}</p>
				</td>
				<td class="topic_content_and_reply">
					{$topic[0].topic_content|wordwrap:200:"<br />"}
				</td>							
			</tr>				
			{/if}
			{foreach from=$replies item=reply}
			<tr class="posted_content">
				<td class="post_info" style="clear: left">
					<p class="author"><b>Author: </b>{$reply.author|escape:htmlall:'UTF-8'}({$reply.author_username|escape:htmlall:'UTF-8'}){if $reply.show_admin_icon == true}<img class="admin_icon" src='{$img_dir}admin_icon.png' />{/if}</p>
					<p class="posted"><b>Posted: </b>{$reply.post_time|escape:htmlall:'UTF-8'}</p>
				</td>		
				<td class="topic_content_and_reply">
					{if $adminUser}{* if admin, can pin and delete topic*}
						{assign var='pin_action' value=$reply.pin}
						{assign var='topic_id' value=$reply.topic_id}
						{assign var='type' value='reply'}
						{include file="$tpl_dir./webboard-admin-panel.tpl"}
					{/if}	
					{$reply.topic_content|wordwrap:100:"<br />"}
				</td>				
			</tr>
			{/foreach}
		</table>
		<a id="reply" class="reply_button" href="webboard.php?action=post&topic={$topic[0].topic_id}.1" title="Post Reply"></a>
	</div>
	<div class="footer">		
	</div>
</div>